/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package social.p2p.model;

import java.io.Serializable;
import javax.persistence.*;

/**
 *
 * @author miguel
 */
@Entity
@Table(name = "ESTADO")
@NamedNativeQueries({
    @NamedNativeQuery(name = "Estado.selectAll", query = "Select * from estado", resultClass = Estado.class),
    @NamedNativeQuery(name = "Estado.getEstadoData", query = "Select * from estado where ID=?", resultSetMapping = "onlyEstado", resultClass = Estado.class)
})
public class Estado implements Serializable {
    
    private static final long serialVersionUID = 1L;
    @Column(name = "ID")
    private String id;
    @Id
    @Basic(optional = false)
    @Column(name = "METODO")
    private String metodo;
    @Column(name = "PARAMETROS")
    private String parametros;

    public Estado() {
    }
    
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    
    public String getMetodo() {
        return metodo;
    }
    
    public void setMetodo(String metodo) {
        this.metodo = metodo;
    }

    public void setParametros(String parametros) {
        this.parametros = parametros;
    }
    
    public String getParametros() {
        return parametros;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Estado)) {
            return false;
        }
        Estado other = (Estado) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "social.p2p.model.Estado[ id=" + id + " ]";
    }
    
}
